<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>新闻管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
    <link rel="stylesheet" href="../../../css/wangeditor.css">
    <!-- <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet"> -->
</head>
<style>
    #editor—wrapper {
        border: 1px solid #ccc;
        z-index: 100;
        /* 按需定义 */
    }

    #toolbar-container {
        border-bottom: 1px solid #ccc;
    }

    #editor-container {
        height: 500px;
    }
</style>

<body>
    <div id="app" class="minWidth">
        <el-form :model="form" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">添加新闻</div>
            </div>
            <el-descriptions :column="2" border size="small">
                <el-descriptions-item label="新闻标题">
                    <el-form-item prop="News_Name">
                        <el-input v-model.trim="form.News_Name" placeholder="请输入新闻标题"></el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="新闻类别">
                    <el-form-item prop="News_Type">
                        <el-select style="width: 100%;" v-model="form.News_Type" clearable placeholder="请选择新闻类别">
                            <el-option v-for="item in options" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="新闻封面图">
                    <el-form-item prop="News_Type">
                        <div class="preview" v-show="form.Picture_URL">
                            <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                                :src="Domain_Business + form.Picture_URL" fit="contain"></el-image>
                            <span class="el-upload-list__item-actions">
                                <span @click="handlePictureCardPreview(form.Picture_URL)"><i
                                        class="el-icon-zoom-in"></i></span>
                                <span @click="handleRemove('front')"><i class="el-icon-delete"></i></span>
                            </span>
                        </div>
                        <el-upload v-show="!form.Picture_URL" class="upload-demo" :show-file-list="false"
                            list-type="picture-card" action="" accept="image/*" :before-upload="uploadFront">
                            <i slot="default" class="el-icon-plus"></i>
                            <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
                        </el-upload>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <el-form-item prop="Company_Profile_Main">
                <el-row :gutter="20">
                    <el-col :span="12">
                        <div class="table_titel">
                            <div class="titel">公司简介内容</div>
                        </div>
                        <yl-text-editor v-model="form.News_Main"
                            placeholder="在此处填写公司简介内容..."></yl-text-editor>
                    </el-col>
                    <el-col :span="12">
                        <div class="table_titel">
                            <div class="titel">简介预览</div>
                        </div>
                        <div class="editor_preview" v-html="form.News_Main"></div>
                    </el-col>
                </el-row>
            </el-form-item>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
        <!-- <el-form ref="form" :model="form" label-width="100px">
            <el-form-item label="新闻标题">
                <el-input style="width: 500px;" placeholder="请输入新闻标题" v-model="form.News_Name" clearable>
                </el-input>
            </el-form-item>
            <el-form-item label="新闻类型">
                <el-select v-model="form.News_Type" clearable placeholder="请选择新闻类型">
                    <el-option v-for="item in options" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="新闻类型">
                <el-select v-model="form.News_Type_SerialNumber" clearable placeholder="请选择新闻类型">
                    <el-option v-for="(item,index) in New_Type" :key="index" :label="item.New_Type_Name"
                        :value="item.New_Type_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="新闻封面图">
                <div class="preview" v-show="form.Picture_URL">
                    <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                        :src="Domain_Business + form.Picture_URL" fit="contain"></el-image>
                    <span class="el-upload-list__item-actions">
                        <span @click="handlePictureCardPreview(form.Picture_URL)"><i class="el-icon-zoom-in"></i></span>
                        <span @click="handleRemove('front')"><i class="el-icon-delete"></i></span>
                    </span>
                </div>
                <el-upload v-show="!form.Picture_URL" class="upload-demo" :show-file-list="false"
                    list-type="picture-card" action="" accept="image/*" :before-upload="uploadFront">
                    <i slot="default" class="el-icon-plus"></i>
                    <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
                </el-upload>
            </el-form-item>
        </el-form>
        <el-button @click="submitForm('contract')" type="primary">提交审核</el-button>
        <el-button @click="back" type="primary">返回</el-button>
        <el-row :gutter="20">
            <el-col :span="12">
                <div class="table_titel">
                    <div class="titel">新闻内容</div>
                </div>
                <yl-text-editor v-model="form.News_Main" placeholder="在此处填写新闻内容..."></yl-text-editor>
            </el-col>
            <el-col :span="12">
                <div class="table_titel">
                    <div class="titel">新闻预览</div>
                </div>
                <div class="editor_preview" v-html="form.News_Main"></div>
            </el-col>
        </el-row> -->
    </div>
    <script type="text/javascript" src="../../../js/wangeditor.js"></script>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../js/compressor.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>